#ifndef SDelegate3_H
#define SDelegate3_H

#include "Global_Signal.h"
#include "abstractDelegate.h"

template <class T,class U,class V>
class sDelegate3 : public AbstractDelegate
{
    public :

    int (*pDelegate)(T,U,V);            /*!< Prototype du pointeur de la fonction membre à exécuter  */

    T arg1;
    U arg2;
    V arg3;

    sDelegate3(int (*apDelegate)(T,U,V),T aArg1, U aArg2, V aArg3);

    virtual void Run();

    template<class T>
     virtual  void Run(T arg)=0;

    template<class T, class U>
     virtual  void Run(T arg, U arg2)=0;

    template<class T, class U, class W>
     virtual  void Run(T arg, U arg2, W arg3)=0;
};


template <class T, class U,class V>
sDelegate3<T,U,V>::sDelegate3(int (*apDelegate)(T,U,V),T aArg1, U aArg2, V aArg3)
{
        pDelegate=apDelegate;
        arg1=aArg1;
        arg2=aArg2;
        arg3=aArg3;
}


template <class T, class U, class V>
void sDelegate3<T,U,V>::Run()
{
    (*pDelegate)(arg1, arg2,arg3);
}

#endif // SDelegate3_H
